#include<bits/stdc++.h>
using namespace std;

int main(){
    freopen("arena.in","r",stdin);
    freopen("arena.out","w",stdout);

    int n,m;cin >> n >> m;int t;
    for(int i = 1;i <= n;i++)  cin >> t;
    for(int i = 1;i <= m;i++)   cin >> t;
    int T;cin >> T;
    while(T--){
        puts("0");
    } 
    return 0;
}
